package cn.jiyun.controller;

import cn.jiyun.pojo.States;
import cn.jiyun.service.StatesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("states")
@CrossOrigin
public class StatesController {

    @Autowired
    private StatesService statesService;

    @RequestMapping("findAll")
    public List<States> findAll(){
        return statesService.findAll();
    }

}
